class Food{
  element:HTMLElement;
  constructor(){
    this.element=document.getElementById('food')!;
  }
  get X(){
    return this.element.offsetLeft
  }
  get Y(){
    return this.element.offsetTop
  }
  change(){
    let pos =Math.round(Math.random()*29)*10
    this.element.style.left=pos +'px'
    this.element.style.top=pos +'px'
  }
}

// const food = new Food();
// food.change()
// console.log(food.X,food.Y);
// console.log(Math.round(Math.random()*29));

export default Food;